package eu.otherweb.util;

public class StringUtil {
    public static  <T> String getToStringFromArray(T[] array) {
        if (array == null || array.length == 0) {
            return "";
        }

        String s = array.getClass().getSimpleName().replace("[]", "") + "=";
        for (T element : array) {
            s = s.concat(element != null ? element.toString() : "null");
        }
        return s;
    }
}
